﻿@model BusinessLogic.Model.ProductAddNew

@{
    ViewBag.Title = "CreateNewProduct";
}

<h2>Create New Product</h2>

@using (Html.BeginForm("CreateNewProduct", "Product", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>ProductAddNew</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Price)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Price)
            @Html.ValidationMessageFor(model => model.Price)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.SalePrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.SalePrice)
            @Html.ValidationMessageFor(model => model.SalePrice)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Detail)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Detail)
            @Html.ValidationMessageFor(model => model.Detail)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CategoryId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CategoryId)
            @Html.ValidationMessageFor(model => model.CategoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.BusinessId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.BusinessId)
            @Html.ValidationMessageFor(model => model.BusinessId)
        </div>
         <div class="editor-label">
            @Html.LabelFor(model => model.Image)
        </div>
        <div class="editor-field">
            <input name="ImageFile" type="file"/>
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
